import { INewsInfo } from './store';

//路由对应的Header设置信息
interface IHeaderInfo {
  name: string;
  title: string;
  left: boolean;
  right: boolean;
  leftIcon: string;
  rightIcon: string;
  leftPath: string;
  rightPath: string;
}

//请求数据需要的参数类型payload
interface IPostData {
  //NAV_TYPES为枚举类型
  type: NAV_TYPES;
  pageNum: number;
  count: number;
}

//定义枚举新闻类型
enum NAV_TYPES {
  TOP = 'top',
  SHEHUI = 'shehui',
  GUONEI = 'guonei',
  GUOJI = 'guoji',
  YULE = 'yule',
  TIYU = 'tiyu',
  JUNSHI = 'junshi',
  KEJI = 'keji',
  CAIJING = 'caijing',
  SHISHANG = 'shishang'
}

//返回的数据对象类型
interface IRetNewsData {
  data: INewsInfo[] | null;
  hasMore: boolean;
}

export { IHeaderInfo, NAV_TYPES, IPostData, IRetNewsData };
